<template>
<header class="mdv-app-header">
  <a class="name" @click="home">mdv</a>
  <span class="lang">
    {{ token }}
  </span>
</header>
</template>

<script>
import store from '@/stores/'

export default {
  name: 'MdvAppHeader',
  data () {
    return {
    }
  },
  computed: {
    token () {
      return store.state.common.token
    }
  },
  created () {
  },
  mounted () {
  },
  methods: {
    home () {
      this.$router.replace({path: '/'})
    }
  },
  components: {
  }
}
</script>

<style lang="scss">
.mdv-app-header {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  padding: 0 20px;
  height: 50px;
  line-height: 50px;
  display: block;
  background-color: #3E5B76;
  color: #FFF;
  z-index: 99;
  text-align: left;
  .name {
    color: #fff;
    font-weight: bold;
    font-size: 24px;
    text-decoration: none;
    cursor: pointer;
    &:hover {
      color: #FAFAFA;
      transform: scale(1.1);
    }
  }
  .lang {
      float: right;
  }
}
</style>
